#ifndef __LULY_H_
#define __LULY_H_
#include "PLATFORM.h"
#ifdef _ANDROID_PLATFORM__
#include "SDL.h"
#include "SDL_ttf.h"
#else
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#endif



#include <string>
#include <thread>

class _Luly {
 private:
  _Luly() {}

 public:
  bool isRunning = true;
  bool isFullScreen = false;
  int windowWidth = 1280;
  int windowHeight = 720;
  double scale = 1;
  int maxFPS = 60;
  double currentFPS = 60;
  std::string title;
  SDL_Window* p_window = nullptr;
  SDL_Renderer* p_renderer = nullptr;
  SDL_Event current_event;
  std::chrono::nanoseconds fps_start;//fps开始计时点

 public:
  static _Luly& getInstance() {
    static _Luly instance;
    return instance;
  }
  void init_load();
  void init();
  void event();
  void update();
  void draw();

  ~_Luly();
};

#endif